function path=randomtest(N,casenum)
%%%pg 267 of shrevebook
%m=1; alpha=0; y0=0; beta=1;

time=linspace(0,1/2,N);
deltat=1/2/(N-1);
path=zeros(size(time));

switch(casenum)
    case 2
        for ii=2:N
            path(ii)=path(ii-1)+sin(5*time(ii-1))*randn(1)*sqrt(deltat);
        end
     case 3
        for ii=2:N
            path(ii)=path(ii-1)+sin(30*time(ii-1))*randn(1)*sqrt(deltat);
        end
        case 4
        for ii=2:N
            path(ii)=path(ii-1)+sin(exp(5*time(ii-1)))*randn(1)*sqrt(deltat);
        end
    case 21 || 22
        path(1)=1;
        for ii=2:N
            path(ii)=path(ii-1)+(1-path(ii-1))*deltat+randn(1)*sqrt(deltat);
        end
    case 23
        getou=ouprocess(1,1,1,1,5001);
        for ii=2:N
            path(ii)=path(ii-1)+getou(ii-1)*randn(1)*sqrt(deltat);
        end
    case 311
        [getOU,getBM]=correlatedou(0,0,0,1,5001);
        path=getOU.*getBM;
    case 312
        [getOU,getBM]=correlatedou(1,1,1,1,5001);
        path=getOU.*getBM;
    case 32
        for ii=2:N
            path(ii)=path(ii-1)+randn(1)*sqrt(deltat);
        end
    case 331
        [getOU,getBM]=correlatedou(0,0,0,1,5001);
        path=getOU.*getBM;
    case 332
        [getOU,getBM]=correlatedou(1,1,1,1,5001);
        path=getOU.*getBM;
end